// 公表管理
export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  searchMenuSpan: 6,
  searchBtnText: "查询",
  emptyBtnText: "重置",
  editBtn: false,
  delBtn: false,
  align: "center",
  viewBtn: false,
  addBtn: false,
  dialogEscape: false,
  dialogClickModal: false,
  columnBtn: false,
  menuWidth: 140,
  column: [
    {
      type: "input",
      label: "主键",
      hide: true,
      prop: "id"
    },
    {
      type: "input",
      label: "关联房产编号",
      width: "150px",
      prop: "projectNumber"
    },
    {
      type: "select",
      label: "房产类型",
      search: true,
      searchslot: true,
      width: "150px",
      prop: "projectBuildingId",
      dicUrl: "/admin/dict/type/rm_project_buiding_type",
      formatter: function(row, value, label, column) {
        return value + "";
      }
    },
    {
      type: "select",
      label: "期数",
      search: true,
      searchslot: true,
      hide: true,
      width: "150px",
      prop: "projectRegionStage",
      dicUrl: "/admin/dict/type/rm_project_buiding_type",
      formatter: function(row, value, label, column) {
        return value + "";
      }
    },
    {
      type: "select",
      label: "楼号/位置",
      width: "150px",
      search: true,
      searchslot: true,
      prop: "projectSite"
      // dicUrl: `/admin/dict/type/{{key}｝`
    },
    {
      type: "month",
      label: "应缴月份",
      search: true,
      searchslot: true,
      width: "100px",
      prop: "writeDate",
      // format: "yyyy-MM",
      // valueFormat: "yyyy-MM",
      formatter: function(row, value, label, column) {
        if (value) {
          return value.replace("-", "年") + "月";
        } else {
          return "";
        }
      }
    },
    {
      type: "input",
      label: "表类型",
      width: "80px",
      prop: "meterTypeStr"
    },
    {
      type: "input",
      label: "上期度数",
      width: "100px",
      prop: "meterStartPoint"
    },
    {
      type: "input",
      label: "本期度数",
      prop: "meterEndPoint"
    },
    {
      type: "input",
      label: "本期用量",
      prop: "meterTotalPoint"
    },
    {
      type: "input",
      label: "倍率",
      prop: "meterRate"
    },
    {
      type: "input",
      label: "更新者",
      hide: true,
      prop: "updateBy"
    },
    {
      type: "input",
      width: "150px",
      label: "最近编辑时间",
      hide: true,
      prop: "updateDate"
    },
    {
      type: "input",
      label: "备注信息",
      hide: true,
      prop: "remarks"
    },
    {
      type: "input",
      label: "删除",
      hide: true,
      prop: "isDeleted"
    },
    {
      type: "input",
      hide: true,
      label: "逻辑删除标记（0：显示；1：隐藏",
      prop: "delFlag"
    }
  ]
};

// 查看抄表信息
export const tableOptionModify = {
  addBtn: false,
  border: true,
  index: true,
  editBtn: false,
  indexLabel: "序号",
  stripe: true,
  dialogEscape: false,
  dialogClickModal: false,
  menuAlign: "center",
  align: "center",
  refreshBtn: false,
  columnBtn: false,
  searchSize: "mini",
  cellBtn: false,
  delBtn: false,
  delBtnText: "清除",
  rowKey: "indexid",
  column: [
    {
      width: 150,
      hide: true,
      label: "序号",
      prop: "indexid"
    },
    {
      width: 150,
      label: "位置",
      hide: true,
      prop: "projectUnitId"
    },
    {
      cell: true,
      label: "上期读数",
      prop: "startPoint"
    },
    {
      cell: true,
      label: "本期读数",
      prop: "endPoint"
    },
    {
      label: "本月用量",
      prop: "totalPoint",
      type: "input"
    },
    {
      label: "抄表时间",
      prop: "writeTime",
      type: "input"
    }
  ]
};

// 新增抄表信息
export const tableOptionAddModify = {
  addBtn: false,
  border: true,
  index: true,
  editBtn: false,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  refreshBtn: false,
  columnBtn: false,
  searchSize: "mini",
  cellBtn: true,
  delBtn: false,
  delBtnText: "清除",
  dialogEscape: false,
  dialogClickModal: false,
  rowKey: "indexid",
  menuWidth: 130,
  column: [
    {
      width: 150,
      hide: true,
      label: "",
      prop: "indexid"
    },
    {
      label: "关联房产编号",
      prop: "projectNumber",
      width: "100px"
    },
    {
      cell: true,
      label: "上期读数",
      prop: "startPoint"
    },
    {
      cell: true,
      label: "本期读数",
      prop: "endPoint"
    },
    {
      label: "本月用量",
      prop: "totalPoint",
      type: "input",
      slot: true
    },
    {
      cell: true,
      label: "房产是否入住",
      prop: "checkIn",
      type: "select",
      dicData: [
        {
          label: "否",
          value: "0"
        },
        {
          label: "是",
          value: "1"
        }
      ]
    }
  ]
};
